import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'fluent-mdl2:product-release',
      keepAlive: true,
      order: 2,
      title: $t('product.title'),
    },
    name: 'product',
    path: '/product',
    children: [
      {
        meta: {
          title: $t('product.list'),
        },
        name: 'productList',
        path: '/product/list',
        component: () => import('#/views/product/index.vue'),
      },
      {
        meta: {
          title: $t('product.listDeatil'),
          hideInMenu: true,
        },
        name: 'productListDeatil',
        path: '/product/listDetail/:id?',
        component: () => import('#/views/product/ListDeatil.vue'),
      },
    ],
  },
];

export default routes;
